package com.hzw.saas.web.admin.hpc.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzw.saas.common.util.constants.PatternConsts;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author zzl
 * @since 02/05/2021
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "机时增值统计数据")
public class HpcProviderUsageParam {

    @ApiModelProperty(value = "超算中心类型，DQ01-并行账号，DN02-青云账号", position = 1)
    private String hpcProviderType;

    @ApiModelProperty(value = "最近天数，1：当天，7：最近7天，若该属性存在且大于0，则忽略startDate与endDate", position = 2)
    private Integer offsetDays;

    @ApiModelProperty(value = "开始时间,yyyy-MM-dd HH:mm:ss", position = 3)
    @DateTimeFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    @JsonFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    private Date startDate;

    @ApiModelProperty(value = "结束时间,yyyy-MM-dd HH:mm:ss，若该属性为空，则默认为当天", position = 4)
    @DateTimeFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    @JsonFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    private Date endDate;

}
